---
title: Tools
description: Learn how to use Latitude's built-in tools in your prompts.
---

# Overview

Latitude comes with a selection of built-in tools that can be used in your prompts. These tools allow you to extend the capabilities of the AI model by providing additional functionality beyond its default behavior.

<Note>
  Latitude Tools are specially useful with
  [Agents](/guides/prompt-manager/agents), as they will be able to interpret the
  tool results and improvise accordingly.
</Note>

<Warning>
  Tools may not be available for all providers or models. Check the
  documentation of your provider to see if tools are supported.
</Warning>

---

## Defining available Latitude Tools

Currently, Latitude supports the following built-in tools:

- `latitude/code`
- `latitude/search`
- `latitude/extract`

To add them to your prompt, simply include them in the `tools` section in your prompt configuration:

```yaml
---
provider: <your-provider-name>
model: <your-model>
tools:
  - latitude/code
  - latitude/search
  - latitude/extract
---
```

You can also use `latitude/*` to include all available tools in your prompt.

```yaml
---
provider: <your-provider-name>
model: <your-model>
tools:
  - latitude/*
```

---

## Code Tool

The `latitude/code` tool enables the execution of custom scripts in Python or JavaScript within the conversation. This tool is ideal for:

- Running complex calculations.
- Making API calls to external services.
- Processing and transforming data dynamically.

When the `latitude/code` tool is available, the AI model can generate and request the execution of code snippets. These snippets can include dependencies that will be installed before execution. Once the code runs, the AI model receives the output as a response.

## Search Tool

The `latitude/search` tool allows the AI model to query the web and retrieve real-time information. It is particularly useful for:

- Looking up recent news or events.
- Finding definitions, facts, or background information.
- Retrieving relevant sources and references.

When this tool is enabled, the AI model can issue search queries, and the `latitude/search` tool will return a list of results, including titles, URLs, and short descriptions of the retrieved content.

## Extract Tool

The `latitude/extract` tool fetches and processes structured content from a given URL. This is useful for:

- Extracting text, metadata, or images from web pages.
- Summarizing long articles.
- Collecting structured data from online sources.

When available, the AI model can request content extraction by providing a URL. The extracted content will be returned in a structured Markdown format, making it easy to read and process further.
